package spec.lijunyao.unit5.collection;

import spec.lijunyao.unit3.clzz.simple.Student;

import java.util.LinkedList;

public class LinkedListTest {
    public static void main(String[] args) {
        LinkedList ll=new LinkedList();
        Student s1=new Student("张三","计信一班","计信");
        Student s2=new Student("李四","计信一班","计信");
        Student s3=new Student("王五","计信一班","计信");
        ll.addFirst(s1);
        ll.addFirst(s2);
        ll.addFirst(s3);
        ll.add(s2);
        System.out.println(ll.size());//3
        System.out.println(ll.getFirst());//李四
        System.out.println(ll.getLast());//李四
    }
}
